﻿@model RewardPointsSettingsModel
@using CAF.Infrastructure.Core.Domain.Orders
@{
    ViewBag.Title = T("Admin.Configuration.Settings.RewardPoints").Text;
}
@using (Html.BeginForm())
{
    <div class="row">
        <div class="col-md-12">
            <div class="portlet light">
                <div class="section-header sticky">
                    <div class="caption">
                        <i class="icon-equalizer font-red-sunglo"></i>
                        <span class="caption-subject font-red-sunglo bold uppercase"> @T("Admin.Configuration.Settings.RewardPoints.Description") </span>
                        <span class="caption-helper"></span>
                    </div>
                    <div class="actions">
                        <button type="submit" name="save" value="save" class="btn btn-primary"><i class="fa fa-check"></i>&nbsp;@T("Admin.Common.Save")</button>
                    </div>
                </div>
                <div class="portlet-body form form-horizontal form-bordered form-row-stripped">

                    @Html.Action("SiteScopeConfiguration", "Setting")
                    @Html.ValidationSummary(false)

                    <div class="form-body">
                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.Enabled)</label>
                            <div class="col-md-6">

                                @Html.SettingEditorFor(model => model.Enabled)
                                @Html.ValidationMessageFor(model => model.Enabled)

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.ExchangeRate)</label>
                            <div class="col-md-6">

                                @Html.SettingOverrideCheckbox(model => Model.ExchangeRate)
                                <span>1积分 =</span>
                                @Html.EditorFor(model => model.ExchangeRate, new { Small = true })
                                <span>元</span>
                                @Html.ValidationMessageFor(model => model.ExchangeRate)

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.RoundDownRewardPoints)</label>
                            <div class="col-md-6">

                                @Html.SettingEditorFor(model => model.RoundDownRewardPoints)
                                @Html.ValidationMessageFor(model => model.RoundDownRewardPoints)

                            </div>
                        </div>
                        <div class="admin-config-group">
                            <div class="title">如何赚取奖励积分？</div>
                        </div>
                        <div class="form-group" id="pnlPictureZoomType">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.PointsForRegistration)</label>
                            <div class="col-md-6">

                                @Html.SettingOverrideCheckbox(model => Model.PointsForRegistration)
                                @Html.EditorFor(model => model.PointsForRegistration, new { Small = true })
                                @Html.ValidationMessageFor(model => model.PointsForRegistration)

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.PointsForProductReview)</label>
                            <div class="col-md-6">

                                @Html.SettingOverrideCheckbox(model => Model.PointsForProductReview)
                                @Html.EditorFor(model => model.PointsForProductReview, new { Small = true })
                                @Html.ValidationMessageFor(model => model.PointsForProductReview)

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.PointsForPurchases_Amount)</label>
                            <div class="col-md-4">
                                @Html.SettingOverrideCheckbox(model => Model.PointsForPurchases_OverrideForStore, "#pnlPointsForPurchases")
                                <span>每单价格</span>
                                @Html.EditorFor(model => model.PointsForPurchases_Amount, new { Small = true })
                                <span>元</span>
                                <span>将赚取</span>
                                <span>积分：</span>
                            </div>
                            <div class="col-md-2">
                                @Html.EditorFor(model => model.PointsForPurchases_Points, new { Small = true })
                                @Html.ValidationMessageFor(model => model.PointsForPurchases_Amount)
                                @Html.ValidationMessageFor(model => model.PointsForPurchases_Points)

                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.PointsForPurchases_Awarded)</label>
                            <div class="col-md-6">

                                @Html.SettingOverrideCheckbox(model => Model.PointsForPurchases_Awarded)
                                @Html.DropDownListFor(model => model.PointsForPurchases_Awarded, ((OrderStatus)Model.PointsForPurchases_Awarded).ToSelectList(), new { @class = "form-control" })
                                @Html.ValidationMessageFor(model => model.PointsForPurchases_Awarded)

                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.PointsForPurchases_Canceled)</label>
                            <div class="col-md-6">

                                @Html.SettingOverrideCheckbox(model => Model.PointsForPurchases_Canceled)
                                @Html.DropDownListFor(model => model.PointsForPurchases_Canceled, ((OrderStatus)Model.PointsForPurchases_Canceled).ToSelectList(), new { @class = "form-control" })
                                @Html.ValidationMessageFor(model => model.PointsForPurchases_Canceled)

                            </div>
                        </div>


                    </div>

                </div>
            </div>
        </div>
    </div>
}
